home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / glibc108.zip / glibc108 / malloc / TODO < prev    next >
Text File  |  1991-07-17  |  1KB  |  21 lines

  1. 0.  Access data structures with accessor macros, then turn the heapinfo
  2. into several arrays for faster access on machines with addressing modes.
  3. Also, this eventually raises the possibility of maintaining multiple
  4. heaps.
  5. 1.  Possible heuristic to catch multiple frees.  Introduce an extra word
  6. of heapinfo that says whether the remaining info is for something
  7. busy or something free.  Then we can catch attempts to free already-free
  8. large blocks, as well as things not belonging to malloc at all.  In the
  9. case of a fragment, we can check if the fragment looks like it *already*
  10. belongs to the fragment list, by comparing it with the "first" fragment
  11. of the block, or checking its "prev" pointer to see if it points into
  12. the block.  Then if it looks like it might we can exhaustively search
  13. the block's free list to see if the fragment is there or not.  Extending
  14. the heapinfo structure would have the benefit of making it a power of
  15. two and thus making array indexing faster, perhaps.  Suitably adapted,
  16. this heuristic could also catch invalid pointers passed to realloc.
  17.  
  18. All of these additional features require the inclusion of <malloc.h>.
  19. 3.  indirect reference allocator: ialloc(), ifree(), irealloc().
  20. 4.  garbage collecting allocator: galloc(), garbage(), gfree(), grealloc().
  21.